package com.oss.mq.timer;

import com.oss.mq.entity.pojo.ServiceRegister;
import com.oss.mq.mapper.ServiceRegisterMapper;
import com.oss.mq.service.IServiceRegisterService;
import com.oss.mq.service.impl.ServiceRegisterServiceImpl;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Author yaoyaoyao
 * Date 2024/7/18 9:57
 */
@Component
public class Timer {
    @Autowired
    ServiceRegisterServiceImpl registerService;

    @Scheduled(cron = "*/5 * * * * ? ")
    public void heartBeat(){
        registerService.heartBeat();
    }

}
